package com.ratel.redis.controller;

import com.ratel.redis.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * Created by ratel on 2021/7/6.
 */
@RestController
public class RedisController {
    @Autowired
    private RedisUtils redisUtils;
    @RequestMapping("/api/saveId")
    public Boolean test(String k,String v){

        UUID uuid = UUID.randomUUID();

        boolean set = redisUtils.set(uuid.toString(), uuid.toString());
        return set;
    }
}
